/*this class is derived from the Car class*/
public class CarOptions extends Car
{
	/*It adds 2 extra members to the base class members*/
	private double maxSpeed;
	private String carType;
	
	/*The derived class constructor calls the base class constructor*/
	public CarOptions(String model,String color,String state,double cost,double maxSpeed,String carType){
		super(model,color,state,cost);
		this.maxSpeed=maxSpeed;
		this.carType=carType;
	}
	/*This method prints all details of the car*/
	/*It internally calls the base class method to print the data*/
	void DriveDetails(){
		super.printDetails();	
		System.out.println("Maximum Speed="+this.maxSpeed);
		System.out.println("Car Type="+this.carType);
		System.out.println("");
	}
	/*This method allows the user to change the name of the model of the car*/
	void changeCarModel(String model){
		super.setModel(model);
		DriveDetails();
	}
}
